package cn.sixmillions.yuqueblog.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @description: 用户实体类
 * @author: sixmillions
 * @since: 2021/12/12
 **/
@Data
@Accessors(chain = true)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 类型 [User - 用户, Group - 团队]
     */
    private String type;

    /**
     * 企业空间编号
     */
    @JSONField(name = "space_id")
    private Long spaceId;

    /**
     * 账户id
     */
    @JSONField(name = "account_id")
    private Long accountId;

    /**
     * 用户个人路径
     */
    private String login;

    /**
     * 昵称
     */
    private String name;

    /**
     * avatar_url
     */
    @JSONField(name = "avatar_url")
    private String avatarUrl;

    /**
     * 仓库数量
     */
    @JSONField(name = "books_count")
    private Integer booksCount;

    /**
     * 公开仓库数量
     */
    @JSONField(name = "public_books_count")
    private Integer publicBooksCount;

    /**
     * 关注你的人数
     */
    @JSONField(name = "followers_count")
    private Integer followersCount;

    /**
     * 你关注的人数
     */
    @JSONField(name = "following_count")
    private Integer followingCount;

    /**
     * 公开状态 [1 - 公开, 0 - 私密]
     */
    @JSONField(name = "public")
    private Integer publicType;

    /**
     * 介绍
     */
    private String description;

    /**
     * 创建时间
     */
    @JSONField(name = "created_at")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @JSONField(name = "updated_at")
    private LocalDateTime updatedAt;

}
